<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-cmn-Hans">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="ThemeBucket">
        <link rel="shortcut icon" href="#" type="image/png">

        <title>Dynamic Table</title>

        <!--引入动态CSS-->
        <?php if(is_array($header["css"])): foreach($header["css"] as $key=>$css): ?><link href="/Public/csf/<?php echo ($theme); ?>/<?php echo ($css); ?>" rel="stylesheet"><?php endforeach; endif; ?>

        <!--引入公用CSS-->
        <link href="/Public/csf/<?php echo ($theme); ?>/css/style.css" rel="stylesheet">
        <link href="/Public/csf/<?php echo ($theme); ?>/css/style-responsive.css" rel="stylesheet">
        <link href="/Public/csf/<?php echo ($theme); ?>/css/jquery-ui-1.8.16.custom.css" rel="stylesheet">
        <link rel="stylesheet" type="text/css" href="/Public/csf/<?php echo ($theme); ?>/webupload/<?php echo ($theme); ?>/webuploader.css">
        

        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
        <script src="/Public/csf/<?php echo ($theme); ?>/js/html5shiv.js"></script>
        <script src="/Public/csf/<?php echo ($theme); ?>/js/respond.min.js"></script>
        <![endif]-->
        <script src="/Public/csf/<?php echo ($theme); ?>/js/jquery-1.10.2.min.js"></script>
        <script type="text/javascript" src="/Public/csf/<?php echo ($theme); ?>/webupload/webuploader.js"></script>
        <script type="text/javascript" src="/Public/csf/<?php echo ($theme); ?>/ueditor/ueditor.config.js"></script>
    <!-- 引入编辑器 js文件样式 -->
    <script type="text/javascript" src="/Public/csf/<?php echo ($theme); ?>/ueditor/ueditor.all.js"></script>
    </head>
    <body class="sticky-header">
        <!-- left side start-->
    <div class="left-side sticky-left-side">

        <!--logo and iconic logo start-->
        <div class="logo">
            <a href="index.html"><img src="/Public/csf/<?php echo ($theme); ?>/images/logo.png" alt=""></a>
        </div>

        <div class="logo-icon text-center">
            <a href="index.html"><img src="/Public/csf/<?php echo ($theme); ?>/images/logo_icon.png" alt=""></a>
        </div>
        <!--logo and iconic logo end-->


        <div class="left-side-inner">

            <!-- visible to small devices only -->
            <div class="visible-xs hidden-sm hidden-md hidden-lg">
                <div class="media logged-user">
                    <img alt="" src="/Public/csf/<?php echo ($theme); ?>/images/photos/user-avatar.png" class="media-object">
                    <div class="media-body">
                        <h4><a href="#">John Doe</a></h4>
                        <span>"Hello There..."</span>
                    </div>
                </div>

                <h5 class="left-nav-title">Account Information</h5>
                <ul class="nav nav-pills nav-stacked custom-nav">
                    <li><a href="#"><i class="fa fa-user"></i> <span>Profile</span></a></li>
                    <li><a href="#"><i class="fa fa-cog"></i> <span>Settings</span></a></li>
                    <li><a href=""><i class="fa fa-sign-out"></i> <span>Sign Out</span></a></li>
                </ul>
            </div>

            <!--sidebar nav start-->
            <ul class="nav nav-pills nav-stacked custom-nav">
                <?php if(is_array($menuList)): foreach($menuList as $key=>$menu): if(in_array(strtoupper($menu['url']),$displayNodes)): if(empty($menu["sub"])): ?><li><a href="<?php echo U($menu['url']); ?>"><i class="fa <?php echo ($menu["icon"]); ?>"></i> <span><?php echo ($menu["name"]); ?></span>
                        <?php else: ?>
                            <?php if($AM == $menu['url']): ?><li class="menu-list nav-active"><a href=""><i class="fa <?php echo ($menu["icon"]); ?>"></i> <span><?php echo ($menu["name"]); ?></span></a>
                            <?php else: ?>
                            <li class="menu-list"><a href=""><i class="fa <?php echo ($menu["icon"]); ?>"></i> <span><?php echo ($menu["name"]); ?></span></a><?php endif; ?>
                                <ul class="sub-menu-list">
                                <?php if(is_array($menu["sub"])): foreach($menu["sub"] as $key=>$subMenu): if(in_array(strtoupper($subMenu['url']),$displayNodes)): ?><li ><a href="<?php echo U($subMenu['url']); ?>"> <?php echo ($subMenu["name"]); ?></a></li><?php endif; endforeach; endif; ?>
                                </ul>
                            </li><?php endif; endif; endforeach; endif; ?>
            </ul>
            <!--sidebar nav end-->

        </div>
    </div>
    <!-- left side end-->
    <!-- main content start-->
    <div class="main-content" >

        <!-- header section start-->
        <div class="header-section">

            <!--toggle button start-->
            <a class="toggle-btn"><i class="fa fa-bars"></i></a>
            <!--toggle button end-->

            <!--search start-->
            <form class="searchform" action="index.html" method="post">
                <input type="text" class="form-control" name="keyword" placeholder="Search here..." />
            </form>
            <!--search end-->
            <!--notification menu start -->
            <div class="menu-right">
                <ul class="notification-menu">
                    <li>
                        <a href="#" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                            <img src="/Public/csf<?php echo ($theme); ?>/images/photos/user-avatar.png" alt="" />
                            <?php echo (session('USER_AUTH_NAME')); ?>
                            <span class="caret"></span>
                        </a>
                        <ul class="dropdown-menu dropdown-menu-usermenu pull-right">
                            <li><a href="#"><i class="fa fa-user"></i>  Profile</a></li>
                            <li><a href="#"><i class="fa fa-cog"></i>  Settings</a></li>
                            <li><a href="<?php echo ($loginOut); ?>"><i class="fa fa-sign-out"></i> Log Out</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
            <!--notification menu end -->

        </div>
        <!-- header section end-->

<!-- page heading start-->
<div class="page-heading">
<h3>
    <?php echo ($breadcrumb["A"]); ?>
</h3>
<ul class="breadcrumb">
    <li>
        <?php echo ($breadcrumb["M"]); ?>
    </li>
    <li>
        <?php echo ($breadcrumb["C"]); ?>
    </li>
    <li class="active"> <?php echo ($breadcrumb["A"]); ?>  </li>
</ul>
</div>
<!-- page heading end-->

<!--body wrapper start-->
<div class="wrapper">
<div class="row">
    <div class="col-sm-12">
        <section class="panel">
            <header class="panel-heading">
                <?php echo ($title); ?>
            </header>
            <div class="panel-body">
                <div class="clearfix">
                    <div class="btn-group">
                        <a class="btn btn-primary" href="<?php echo ($index); ?>" style="margin-right: 30px;">
                           <i class="fa fa-eye"> 所有订单 </i>
                        </a>
                        <a class="btn btn-primary" href="<?php echo ($index); ?>?status=1" style="margin-right: 30px;">
                           <i class="fa fa-eye"> 未付款订单 </i>
                        </a>
                        <a class="btn btn-primary" href="<?php echo ($index); ?>?status=2" style="margin-right: 30px;">
                           <i class="fa fa-eye"> 未发货订单 </i>
                        </a>
                        <a class="btn btn-primary" href="<?php echo ($index); ?>?status=3" style="margin-right: 30px;">
                           <i class="fa fa-eye"> 未收货订单 </i>
                        </a>
                    </div>
                </div>
                <div class="space15"></div>
                <section id="unseen" style="margin-top: 25px;">
                    <table class="table table-bordered table-striped table-condensed">
                        <thead>
                        <tr>
                            <th style="width: 550px;">商品</th>
                            <th>单价</th>
                            <th style="width: 80px;">商品数量</th>
                            <th>实付款</th>
                            <th>订单状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <?php if(is_array($order)): $i = 0; $__LIST__ = $order;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tbody>
                            <tr>
                                <td colspan="6" class="Order_form_time">订单号：<?php echo ($vo["id"]); ?> 下单时间：<?php echo ($vo["add_time"]); ?> </td>
                            </tr>
                            <tr>
                                <td colspan="3">
                                    <table class="Order_product_style">
                                        <tbody>
                                            <?php if(is_array($vo['product'])): $i = 0; $__LIST__ = $vo['product'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$voo): $mod = ($i % 2 );++$i;?><tr>
                                                    <td>
                                                        <div class="product_name clearfix" style="width: 530px;">
                                                            <a href="#" class="product_img">
                                                                <img src="/Public/upload/<?php echo ($voo["photos"]); ?>" width="60px" height="60px"></a>
                                                            <a><?php echo ($voo["merchandise"]); ?></a>
                                                            <!-- <p class="specification">礼盒装20个/盒</p> -->
                                                        </div>
                                                    </td>
                                                    <td><?php echo ($voo["price"]); ?></td>
                                                    <td style="width: 80px;text-align: center;"><?php echo ($voo["number"]); ?></td>
                                                </tr><?php endforeach; endif; else: echo "" ;endif; ?>
                                        </tbody>
                                    </table>
                                </td>   
                                <td class="split_line" style="text-align: center;vertical-align: middle;"><?php echo ($vo["total"]); ?></td>
                                <td class="split_line" style="color: red;text-align: center;vertical-align: middle;">
                                <?php if($vo["status"] == 1): ?>未付款
                                <?php elseif($vo["status"] == 2): ?>未发货
                                <?php elseif($vo["status"] == 3): ?>未收货<?php endif; ?>
                                </td>
                                <td style="vertical-align: middle;text-align: center;">
                                    <a href="<?php echo ($edit); ?>?id=<?php echo ($vo['id']); ?>" title="编辑" class="btn btn-primary"><i class="fa fa-edit"></i></a>
                                    <a href="<?php echo ($del); ?>?id=<?php echo ($vo['id']); ?>" title="删除" class="btn btn-danger"><i class="fa fa-times"></i></a>
                                </td>
                            </tr>
                        </tbody><?php endforeach; endif; else: echo "" ;endif; ?>
                    </table>
                </section>
            </div>
        </section>
        <div style="text-align: center;"><?php echo ($Page->show()); ?></div>
    </div>
</div>
</div>
<!--body wrapper end-->

    <!-- Placed js at the end of the document so the pages load faster -->
    <script src="/Public/csf<?php echo ($theme); ?>/js/jquery-ui-1.9.2.custom.min.js"></script>
    <script src="/Public/csf<?php echo ($theme); ?>/js/jquery-migrate-1.2.1.min.js"></script>
    <script src="/Public/csf<?php echo ($theme); ?>/js/bootstrap.min.js"></script>
    <script src="/Public/csf<?php echo ($theme); ?>/js/modernizr.min.js"></script>
    <script src="/Public/csf<?php echo ($theme); ?>/js/jquery.nicescroll.js"></script>

    <!--动态插入JS-->
    <?php if(is_array($footer["js"])): foreach($footer["js"] as $key=>$script): ?><script src="/Public/csf<?php echo ($theme); ?>/<?php echo ($script); ?>"></script><?php endforeach; endif; ?>
    <script src="/Public/csf<?php echo ($theme); ?>/js/fm.js"></script>
    <!--common scripts for all pages-->
    <script src="/Public/csf<?php echo ($theme); ?>/js/scripts.js"></script>

</script>
    </body>
</html>